import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export function resetRouter() {
  return new Router({
    scrollBehavior: () => ({
      y: 0
    }),
    routes: constantRouterMap
  });
}

export const constantRouterMap = [{
  path: '/login',
  component: () => import('@/views/login/Login')
}];

export default new Router({
  // mode: 'history', //后端支持可开
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRouterMap
});
